package cn.edu.sdjzu.xg.service;

import cn.edu.sdjzu.xg.dao.DepartmentDao;
import cn.edu.sdjzu.xg.domain.Department;

import java.sql.SQLException;

public class DepartmentService {
    private static DepartmentService departmentService = null;
    private static DepartmentDao departmentDao = DepartmentDao.getInstance();
    private DepartmentService(){}
    public static DepartmentService getInstance(){
        if (departmentService == null){
            departmentService = new DepartmentService();
        }
        return departmentService;
    }
    public boolean update(Department department) throws SQLException {
        return DepartmentDao.getInstance().update(department);
    }
}
